<!DOCTYPE html>
<html>
	<head>
		#include('head.html',{title:'评论详情'})
		<link rel="stylesheet" href="css/style.css" />
		<link rel="stylesheet" type="text/css" href="css/comment/a-emoji.css"/>
		<style type="text/css">

			.am-tabs .left-jiantou{
				width: 20%;
				margin:.5em .8em;
				/*text-align: center;*/
			}
			.am-tabs-bd h3{
				font-weight: bold;
			}
			.am-tabs-bd{
				font-size: 18px;
			}
			.detail-style{
				width:100%;
				height: 45px;
				margin-top: 12px;
				background-color: white;
				line-height: 45px;
			}
			#accordion{
				margin-top: 15px;
			}


/*详情页导航栏样式*/
			.scrollspy-nav {
		    top: 0;
		    z-index: 100;
		    background: #4caf50;
		    width: 100%;
		    /*padding: 0 0px;*/
		  }

		  .scrollspy-nav ul {
		    margin: 0;
		    padding: 0;
		  }

		  .scrollspy-nav li {
		    display: inline-block;
		    list-style: none;
		  }

		  .scrollspy-nav a {
		    color: white;
		    padding: 10px 5px;
		    display: inline-block;
		  }

		  .scrollspy-nav a.am-active {
		    color: #fff;
		    font-weight: bold;
		  }

		  .am-panel {
		    margin-top: 20px;
		  }

/*评论界面样式*/
		.box{
    		position: fixed;
    		bottom: 0;
    		width: 100%;
    		left: 0;
    	}
    	#display{
    	 margin-bottom: 100px;
    		overflow: auto;
    	}
    	.bg-orange{
			color:#607D8B!important;
			text-align: center;
			border-radius: 100px;
			position: relative;
			top: 10px;
			font-size: 15px;
			font-weight: bold;
    	}

		.InputBox .text{
			margin-top: 0;
		}

		.commentBtn{
			bottom: 9px;
			right: 0px;
			font-size: 14px;
			padding: 1px 5px !important;
			background: #00BCD4;
			border: 0;
			color: #fff;
			width: auto !important;
		}
		</style>
	</head>
	<body>
	#if(cComment!=null)
		<div id="display">
			<div style="background: #ffffff;padding: 10px;border-radius: 0 0 10px 10px;">
				<div class="text" style="margin: 5px;">
					${cComment.cContent.replace("script","[非法字段]")}
				</div>
				<div class="time" style="text-align: right;font-size: 10px;">
					${cComment.time}
				</div>
				<div id="img" style="margin-bottom: 8px;">
					<ul data-am-widget="gallery" class="am-gallery am-avg-sm-3 am-avg-md-3 am-avg-lg-4 am-gallery-default" style="margin-left: -10px;" data-am-gallery="{ pureview: true }" >
						#for(pic : cPictureList)
						<li>
							<div class="am-gallery-item">
								<img src="images/picture/${pic.pFilename}"/>
							</div>
						</li>
						#end
					</ul>
				</div>
			</div>
					<div class="commentBox">
						#for(comment : cCommentList)
						<div class="li">
							<div class="icon">
								<a href="person_center?uId=${comment.cUid}"><img src="images/headicon/${comment.uicon}" style="width: 30px;"/></a>
							</div>
							<div class="content">
									<div class="name" style="margin-top:0;">
										<a href="person_center?uId=${comment.cUid}">${comment.uname}</a>
										<span style="float:right;font-size: 13px;" onclick="myresponse(${comment.cId},'${comment.uname}','${comment.cUid}')">回复</span>
									</div>
								<div class="time">
									${comment.time}
								</div>
								<div class="text">
									#if(comment.cFlag>100)
									<a href="person_center?uId=${comment.cFlag}" style="color: #0e90d2;float: left;">@ ${comment.uname2} </a>
									#end
									${comment.cContent.replace("script","[非法字段]")}
								</div>

							</div>
						</div>
						#end
					</div>
				</div>
		<div class="box" style="z-index: 999;"></div>
	</body>
	<script type="text/javascript">
        var flag = 0;
        // var uid = ${cComment.cUid};//用户id
        // var uId = uid;
        var vId = ${cComment.cVid};//景点id
        var cId = ${cComment.cId};//评论id
        #if (user!=null)
            flag = 1;
			var username = "${user.uName}";
			var uicon = "${user.uPic}";
        #end
	</script>
	<script src="js/comment/a-emoji2.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(".left-jiantou").click(function() {
			history.back();
		})
//  	$('.Main').myEmoji();
		var e = A_Emoji($('.box'));
		// for(var i=0;i<10;i++){
		// 	addRow();
		// }
		checkText();
    </script>
	<script type="text/javascript">
        $(".am-nav-tabs").find($("li")[3]).click(function(){
            $(".box").show();
        });
        $(".am-nav-tabs").find($("li")[0]).click(function(){
            $(".box").hide();
        });
        $(".am-nav-tabs").find($("li")[1]).click(function(){
            $(".box").hide();
        });
        $(".am-nav-tabs").find($("li")[2]).click(function(){
            $(".box").hide();
        });
        var img = $("#img img");
        img.height(img.width());

        //回复
		function myresponse(cId,uname,uId) {
            $(".InputBox .text").html('<div contenteditable="false" id="myCid" cId="'+cId+'" uId="'+uId+'" style="background: #eee;border-radius: 0px;padding: 0 10px;margin-left: -5px;">回复：'+uname+'</div><div id="mycontent">&nbsp;</div>');
        }
	</script>
	#else
	<div style="text-align: center;margin-top: 20%;">该评论不存在！</div>
	#end
</html>
